from GAN.visualize import *

torch.backends.cudnn.benchmark = True
colorizer = get_image_colorizer()

source_url = "test_images\\1.jpg"
render_factor = 20
watermarked = False
image = colorizer.plot_transformed_image(path=source_url, render_factor=render_factor)
IO = BytesIO()
image.save(IO, 'jpeg')
IOImg = IO.getvalue()